import http from '../utils/http';

// 用户登录
export const login = (params) => {
  return http.post('/auth/login', params);
};

// 用户注册
export const register = (params) => {
  return http.post('/auth/register', params);
};

// 获取用户信息
export const getUserInfo = () => {
  return http.get('/user/info');
};

// 更新用户信息
export const updateUserInfo = (params) => {
  return http.put('/user/info', params);
};

// 获取用户列表
export const getUserList = (params) => {
  return http.get('/users', params);
};

// 修改密码
export const changePassword = (params) => {
  return http.post('/user/password', params);
};

// 获取验证码
export const getCaptcha = (params) => {
  return http.get('/captcha', params);
};